using Lapointe.WebPartPageHistory.ProvisioningHelpers;
using Microsoft.SharePoint;

namespace Lapointe.WebPartPageHistory.FeatureReceivers
{
    public class FeatureReceiver : SPFeatureReceiver
    {
        /// <summary>
        /// Occurs after a Feature is activated.
        /// </summary>
        /// <param name="properties">An <see cref="T:Microsoft.SharePoint.SPFeatureReceiverProperties"></see> object that represents the properties of the event.</param>
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            var web = properties.Feature.Parent as SPWeb;
            WebProvisioner.CreateHistoryList(web);
        }

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
        {
            /* no op */
        }

        public override void FeatureInstalled(SPFeatureReceiverProperties properties)
        {
            /* no op */
        }

        public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
        {
            /* no op */
        }
    }
}